package com.itheima.properties;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

/*
Properties 作为map 的使用
 */
public class Demo01 {
    public static void main(String[] args) {
        Properties properties = new Properties();
        properties.put("小璐","PGone");
        properties.put("马蓉","宋喆");
        properties.put("孙雨","王力宏");
 /*      /// System.out.println(properties);
properties.remove("马蓉");
       // System.out.println(properties);
        properties.put("孙雨","高富帅");

        //System.out.println(properties);
        Object o = properties.get("小璐");
        System.out.println(o);*/
        Set<Object> keys = properties.keySet();
        keys.forEach(k-> System.out.println(k+"="+properties.get(k)));
        System.out.println("---------------");
        Set<Map.Entry<Object, Object>> entries = properties.entrySet();
        entries.forEach(entry-> System.out.println(entry.getKey()+"%"+entry.getValue()));
        System.out.println("---------");
        properties.forEach((k,v)-> System.out.println(k+"@@"+v));

    }

}
